" #!/bin/sh
" # generate tag file for lookupfile plugin
" echo -e "!_TAG_FILE_SORTED\t2\t/2=foldcase/" > filenametags
" find . -not -regex '.*\.\(png\|gif\)' -type f -printf "%f\t%p\t1\n" | \
"     sort -f >> filenametags

" :let g:LookupFile_TagExpr = '"./filenametags"'

""""""""""""""""""""""""""""""
" lookupfile setting
""""""""""""""""""""""""""""""
let g:LookupFile_MinPatLength = 2               "最少输入2个字符才开始查找
let g:LookupFile_PreserveLastPattern = 0        "不保存上次查找的字符串
let g:LookupFile_PreservePatternHistory = 1     "保存查找历史
let g:LookupFile_AlwaysAcceptFirst = 1          "回车打开第一个匹配项目
let g:LookupFile_AllowNewFiles = 0              "不允许创建不存在的文件
if filereadable("./filenametags")                "设置tag文件的名字
let g:LookupFile_TagExpr = '"./filenametags"'
endif

" <c-n> and <c-p> to up and down file list
nmap <silent> <leader>lk :LUTags<cr> "映射LookupFile为,lk
"nmap <silent> <leader>ll :LUBufs<cr> "映射LUBufs为,ll
"nmap <silent> <leader>lw :LUWalk<cr> "映射LUWalk为,lw